package com.whfp.coky.ui.task.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * 查询要打印的码 实体类
 */
public class SearchCodePrintBean implements Parcelable {

    private String title;
    private List<Info> info;

    public SearchCodePrintBean(){};

    protected SearchCodePrintBean(Parcel in) {
        title = in.readString();
        info = in.createTypedArrayList(Info.CREATOR);
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(title);
        dest.writeTypedList(info);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<SearchCodePrintBean> CREATOR = new Creator<SearchCodePrintBean>() {
        @Override
        public SearchCodePrintBean createFromParcel(Parcel in) {
            return new SearchCodePrintBean(in);
        }

        @Override
        public SearchCodePrintBean[] newArray(int size) {
            return new SearchCodePrintBean[size];
        }
    };

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public List<Info> getInfo() {
        return info;
    }

    public void setInfo(List<Info> info) {
        this.info = info;
    }

    public static class Info implements Parcelable{
        private String code;
        private String name;
        private String ewm;
        private String bqbh;

        public Info(){}


        protected Info(Parcel in) {
            code = in.readString();
            name = in.readString();
            ewm = in.readString();
            bqbh = in.readString();
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(code);
            dest.writeString(name);
            dest.writeString(ewm);
            dest.writeString(bqbh);
        }

        @Override
        public int describeContents() {
            return 0;
        }

        public static final Creator<Info> CREATOR = new Creator<Info>() {
            @Override
            public Info createFromParcel(Parcel in) {
                return new Info(in);
            }

            @Override
            public Info[] newArray(int size) {
                return new Info[size];
            }
        };

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getEwm() {
            return ewm;
        }

        public void setEwm(String ewm) {
            this.ewm = ewm;
        }

        public String getBqbh() {
            return bqbh;
        }

        public void setBqbh(String bqbh) {
            this.bqbh = bqbh;
        }
    }
}
